<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of DataController
 *
 * @author vampired
 */
class Admin_DataController extends Zend_Controller_Action{
    //put your code here
    public function autherAction() {
        $this->_helper->layout()->disableLayout();
        $this->_helper->getHelper('viewRenderer')->setNoRender(true);
        $results = AutherTable::search($this->_getParam('term'));
        $this->_helper->json(array_values($results));
    }
    
    public function categoryAction() {
        $this->_helper->layout()->disableLayout();
        $this->_helper->getHelper('viewRenderer')->setNoRender(true);
        $results = CategoriesTable::search($this->_getParam('term'));
        $this->_helper->json(array_values($results));
    }
    
    public function levelAction() {
        $this->_helper->layout()->disableLayout();
        $this->_helper->getHelper('viewRenderer')->setNoRender(true);
        $results = LevelsTable::search($this->_getParam('term'));
        $this->_helper->json(array_values($results));
    }
}

?>
